package com.accelstack.cmp.repository;

import com.accelstack.cmp.entity.Container;
import com.accelstack.cmp.enums.ContainerStatus;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 容器Repository
 */
@Repository
public interface ContainerRepository extends JpaRepository<Container, Long> {
    
    /**
     * 根据虚拟化主机ID查询容器列表
     */
    List<Container> findByVirtHostId(Long virtHostId);
    
    /**
     * 根据状态查询容器列表
     */
    List<Container> findByStatus(ContainerStatus status);
}

